/**
 * 
 */
package org.cuatrovientos.cards;

import java.util.Collections;
import java.util.Random;
import java.util.Vector;

/**
 * @author david_berrade
 *
 */
public class Deck {

	private Vector<Card> cards;
	
	public Deck(){
	
	cards= new Vector<Card>();
	loadDeck();
	
	}

	private void loadDeck(){
		
		String[] suits={"Spades","Clubs","Hearts","Diamonds"};
		String[] names={"2","3","4","5","6","7","8","9","10","J","Q","K","A"};
		
		int value=2;
		
		for (int i=0;i<suits.length;i++){
			for (int j=0; j<names.length;j++){
				
				cards.add(new Card(names[j],suits[i],value));
				value++;
				
			}
			value=2;
			
		}
		
	}
	
		public String toString(){
			return cards.toString();
			
			
		}
		
		
		public void  shuffle(){
			Collections.shuffle(cards);
			
		}
		
		public Card getCard(int i){
			
			return cards.get(i);
		}
		
		
		
	}
	

